<template>
  <view class="wrap">
    <top-tab tabTitle="购买记录" @backClick="backClick" backColor="#5B2177"></top-tab>
		<!-- 顶部选项卡 -->
		<view class="tabs-box">
			<ms-tabs :list="list" v-model="tabActive" itemColor='#A912E7' lineColor='#A912E7' @input="matabInput"/>
		</view>
		<view class="main">
			<view class="deal-list" v-for="(item,index) in takeList" :key="item.id" @click="dealDetails">
				<view class="item-title-time">
					<view class="title">{{item.title}}</view>
					<view class="apply-time"><text style="color: #333333;">申请：</text>{{item.time}}</view>
				</view>
				<view class="take-put-money">
					<view  class="take-money"><text style="color: #333333;font-size: 20rpx;">提现金额：</text>{{item.name}}</view>
					<view class="money"><text style="color: #333333;font-size: 20rpx;">发放金额：</text>{{item.money}}</view>
				</view>
				<view class="deal-time-status">
					<view  class="item-time"><text style="color: #333333;font-size: 20rpx;">发放：</text>{{item.cereatTime}}</view>
					<view class="status">使用中</view>
				</view>
			</view>
		</view>
  </view>
</template>

<script>
	import topTab from '@/components/top-tabbar.vue'
	import msTabs from '@/components/ms-tabs.vue'
  export default {
		components: { topTab, msTabs },
    data() {
      return {
				takeList: [
					{ id: 1, title: 'hjdh15556', time: '2021-9-1 12:50:36', name: '开通会员', money: 100.00, cereatTime: '2021-8-30 15:56', status: 0 },
					{ id: 2, title: 'hjdh15556', time: '2021-9-1 12:50:36', name: '开通会员', money: 100.00, cereatTime: '2021-8-30 15:56', status: 1 },
					{ id: 3, title: 'hjdh15556', time: '2021-9-1 12:50:36', name: '开通会员', money: 100.00, cereatTime: '2021-8-30 15:56', status: 2 },
					{ id: 4, title: 'hjdh15556', time: '2021-9-1 12:50:36', name: '开通会员', money: 100.00, cereatTime: '2021-8-30 15:56', status: 3 },
					{ id: 5, title: 'hjdh15556', time: '2021-9-1 12:50:36', name: '开通会员', money: 100.00, cereatTime: '2021-8-30 15:56', status: 4 },
					{ id: 6, title: 'hjdh15556', time: '2021-9-1 12:50:36', name: '开通会员', money: 100.00, cereatTime: '2021-8-30 15:56', status: 5 },
				],
				tabActive: 0,
					list:[
						{ title:'全部', value: 1 }, { title:'已领取', value: 2 },
					],
			}
    },
  onShow() {},
  methods: {
		// 跳详情页
		dealDetails() {
			uni.navigateTo({
				url: '/pages/my/buy_vip/buy_detail'
			})
		},
		// tba事件
		matabInput(e) {
			this.tabActive = e
		},
		// 返回上一页
		backClick() {
			uni.switchTab({
			    url: '/pages/my/index'
			});
		}
	}
}
</script>

<style lang="scss" scoped>
	.tabs-box{
		height: 100rpx;
		border-bottom: 1px solid #F2F2F2;
		line-height: 100rpx;
		/deep/ .tab{
			height: 96rpx !important;
			line-height: 96rpx !important;
		}
		/deep/ .tab__line {
			height: 6rpx !important;
		}
		/deep/ .tab__item {
			line-height: 96rpx !important;
		}
		/deep/ .tab__item-title {
			margin: 0 35rpx !important;
		}
	}
	.main{
		padding: 27rpx;
		.deal-list{
			width: 100%;
			// height: 207rpx;
			background: #FFFFFF;
			box-shadow: 0px 8rpx 16rpx 0px rgba(124, 133, 236, 0.28);
			border-radius: 10rpx;
			font-size: 24rpx;
			color: #333333;
			margin-bottom: 20rpx;
			.item-title-time{
				display: flex;
				align-items: center;
				justify-content: space-between;
				border-bottom: 1px solid #F2F2F2;
				padding: 30rpx 0 23rpx 0;
				.title{
					font-size: 24rpx;
					margin-left: 24rpx;
				}
				.apply-time{
					color: #999999;
					margin-right: 27rpx;
				}
			}
			.take-put-money{
				display: flex;
				align-items: center;
				justify-content: space-between;
				padding: 27rpx 25rpx 32rpx 25rpx;
				font-size: 24rpx;
				font-family: PingFang SC;
				.take-money{
					font-size: 30rpx;
				}
				.money{
					font-size: 24rpx;
				}
			}
			.deal-time-status{
				display: flex;
				align-items: center;
				justify-content: space-between;
				padding: 0rpx 25rpx 35rpx 25rpx;
				.item-time{
					color: #999999;
				}
				.status{
					font-family: PingFang SC;
					font-weight: 500;
					color: #4599F6;
				}
			}
		}
	}
</style>

